package com.cy5;

import oracle.jrockit.jfr.StringConstantPool;

import java.lang.reflect.Array;
import java.util.*;

/**
 * 小验证
 *
 * @author xxx
 * @date 2022/08/02 16:49
 **/
public class StaticBlockDemo {
    public static List<String> writes = new ArrayList<>();
    public StaticBlockDemo(){

    }
    public  StaticBlockDemo(StaticBlockDemo write) {
        System.out.println("我也可以初始化！");
        writes.add("哥是靓仔！");
        System.out.println(writes.toString());
        test();
    }
    public void test(){
        System.out.println("hello");
    }
    static {
        writes.add("沉默王⼆");
        writes.add("沉默王三");
        writes.add("沉默王四");
        System.out.println("第⼀块");
    }
    static {
        writes.add("沉默王五");
        writes.add("沉默王六");
        System.out.println("第⼆块");
    }

    public static void main(String[] args) {
        StaticBlockDemo staticBlockDemo1 = new StaticBlockDemo();
        StaticBlockDemo staticBlockDemo = new StaticBlockDemo(staticBlockDemo1);
        //冒泡排序
        ArrayList <String> list = new ArrayList<String>();
        ArrayList<String> strings = new ArrayList<String>();
        strings.add("陈勇最帅？");
        strings.add("袁湘！");
        strings.add("我们是一辈子的恋人！");
        Object[] objects = strings.toArray();
        System.out.println(Arrays.toString(objects));
        String s = "chenyong";





    }
}
